package com.qyt.hotel.service.impl;

import com.qyt.hotel.dao.RoleMapper;
import com.qyt.hotel.dao.UserMapper;
import com.qyt.hotel.entity.Role;
import com.qyt.hotel.service.RoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class RoleServiceImpl implements RoleService {

    @Resource
    private RoleMapper roleMapper;

    @Override
    public List<Role> getRoleList() {
        return roleMapper.getRoleList();
    }

    @Override
    public Integer addRole(Role role) {
        return roleMapper.addRole(role);
    }

    @Override
    public Integer deleteRole(Role role) {
        return roleMapper.deleteRole(role);
    }

    @Override
    public Role getOne(Integer roleId) {
        return roleMapper.getOne(roleId);
    }

    @Override
    public Integer updateRole(Role role) {
        return roleMapper.updateRole(role);
    }
}
